function participantNew(address) {
    participantModel.append({nick: address,
                                address:address,

                                message:[]
                            })
}

function participantLeave(address)
{
    for (var i = 0; i < participantModel.count; i++) {
        var dp = participantModel.get(i)

        if (dp.address == address) {
            participantModel.remove(i)
            break;
        }
    }
}


function initialize() {
    menuVisible = true
    menuIconSource = "../image/search.svg"
}


function directTo(directqml) {
    if (!usinfo.initialized) {
        contentArea.replace(Qt.resolvedUrl("../qml/LoginNavigator.qml"), {directqml: directqml})
    }
    else {
        contentArea.replace(Qt.resolvedUrl(directqml))
    }
}

function navigate(qml) {
    if (!usinfo.initialized) {
        contentArea.navigate("../qml/LoginNavigator.qml")
    }
    else {
        contentArea.navigate(qml)
    }
}

function menuClicked() {
    if (contentArea.depth >1) {
        contentArea.pop()
        return
    }

    openDrawer()
}
